package com.sky.mapper;

import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.OrderDetail;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    void insert(Orders orders);

    Orders selectOne(Orders ordersQuery);

    void updateById(Orders orders);
    List<Orders> selectOrders(OrdersPageQueryDTO ordersPageQueryDTO);

    List<OrderDetail> selectOnedetail(Orders order);



    Orders selectById(Long id);

    void updatecancel(Orders orders);


    List<Orders> selectListCancellation(LocalDateTime time);

    void updateStatusBeforeTime();

    void updateStatusBystatus();

    Map<String, Object> selectordersStatistics(LocalDate begin, LocalDate end);

    List<Map<String, Object>> selectordersStatistics2(ArrayList<LocalDate> localDates);

    List<Map<String, Object>> top10(LocalDate begin, LocalDate end);
}
